package com.yex.entity.otc;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.Version;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * otc 委托表
 * </p>
 *
 * @author Little Liu
 * @since 2018-05-05
 */
@TableName("otc_entrust")
public class OtcEntrust extends Model<OtcEntrust> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 委托类型 0买入 1卖出
     */
    private Integer type;
    /**
     * 法币币种id
     */
    private Integer coinId;
    /**
     * 用户id
     */
    private Integer userId;
    /**
     * 创建日期
     */
    private Date createDate;
    /**
     * 修改日期
     */
    private Date modifyDate;
    /**
     * 0失效 1正常 2暂定接单 3取消订单
     */
    private Integer status;
    /**
     * 1以指数价格自动获取
     */
    private Integer autoIndex;
    /**
     * 浮动比例
     */
    private BigDecimal floating;
    /**
     * 价格
     */
    private BigDecimal prize;
    /**
     * 金额
     */
    private BigDecimal amount;
    /**
     * 数量
     */
    private BigDecimal several;
    /**
     * 限额
     */
    private String limitAmount;
    /**
     * 版本
     */
    @Version
    private Integer version;
    /**
     * 成交数量
     */
    private BigDecimal dealCount;
    /**
     * 成交金额
     */
    private BigDecimal dealAmount;
    /**
     * 编号
     */
    private String number;
    /**
     * 保证金
     */
    private BigDecimal ensureAmount;
    /**
     * 交易说明
     */
    private String  explain;
    /**
     * 保证金
     */
    private BigDecimal finishCount;
    /**
     * 系统取消
     */
    private Integer sysAuto;

    private BigDecimal finishAmount;
    private BigDecimal fees;
    private BigDecimal finishFees;
    private BigDecimal rate;
    private BigDecimal dealFees;

    @TableField(exist = false)
    private Integer market;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getCoinId() {
        return coinId;
    }

    public void setCoinId(Integer coinId) {
        this.coinId = coinId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getAutoIndex() {
        return autoIndex;
    }

    public void setAutoIndex(Integer autoIndex) {
        this.autoIndex = autoIndex;
    }

    public BigDecimal getFloating() {
        return floating;
    }

    public void setFloating(BigDecimal floating) {
        this.floating = floating;
    }

    public BigDecimal getPrize() {
        return prize;
    }

    public void setPrize(BigDecimal prize) {
        this.prize = prize;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getSeveral() {
        return several;
    }

    public void setSeveral(BigDecimal several) {
        this.several = several;
    }

    public String getLimitAmount() {
        return limitAmount;
    }

    public void setLimitAmount(String limitAmount) {
        this.limitAmount = limitAmount;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public BigDecimal getDealCount() {
        return dealCount;
    }

    public void setDealCount(BigDecimal dealCount) {
        this.dealCount = dealCount;
    }

    public BigDecimal getDealAmount() {
        return dealAmount;
    }

    public void setDealAmount(BigDecimal dealAmount) {
        this.dealAmount = dealAmount;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public BigDecimal getEnsureAmount() {
        return ensureAmount;
    }

    public void setEnsureAmount(BigDecimal ensureAmount) {
        this.ensureAmount = ensureAmount;
    }

    public String getExplain() {
        return explain;
    }

    public void setExplain(String explain) {
        this.explain = explain;
    }

    public BigDecimal getFinishCount() {
        return finishCount;
    }

    public void setFinishCount(BigDecimal finishCount) {
        this.finishCount = finishCount;
    }

    public Integer getSysAuto() {
        return sysAuto;
    }

    public void setSysAuto(Integer sysAuto) {
        this.sysAuto = sysAuto;
    }

    public BigDecimal getFinishAmount() {
        return finishAmount;
    }

    public void setFinishAmount(BigDecimal finishAmount) {
        this.finishAmount = finishAmount;
    }

    public Integer getMarket() {
        return market;
    }

    public void setMarket(Integer market) {
        this.market = market;
    }

    public BigDecimal getFees() {
        return fees;
    }

    public void setFees(BigDecimal fees) {
        this.fees = fees;
    }

    public BigDecimal getFinishFees() {
        return finishFees;
    }

    public void setFinishFees(BigDecimal finishFees) {
        this.finishFees = finishFees;
    }

    public BigDecimal getRate() {
        return rate;
    }

    public void setRate(BigDecimal rate) {
        this.rate = rate;
    }

    public BigDecimal getDealFees() {
        return dealFees;
    }

    public void setDealFees(BigDecimal dealFees) {
        this.dealFees = dealFees;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "OtcEntrust{" +
        ", id=" + id +
        ", type=" + type +
        ", coinId=" + coinId +
        ", userId=" + userId +
        ", createDate=" + createDate +
        ", modifyDate=" + modifyDate +
        ", status=" + status +
        ", autoIndex=" + autoIndex +
        ", floating=" + floating +
        ", prize=" + prize +
        ", amount=" + amount +
        ", several=" + several +
        ", limitAmount=" + limitAmount +
        ", version=" + version +
        ", dealCount=" + dealCount +
        ", dealAmount=" + dealAmount +
        "}";
    }
}
